package com.song.studentddb.vo;

import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.Data;

import java.util.List;

/**
 * 分页
 */
@Data
public class PageVo {
    private List records; //查询数据集合
    private  long total; ///总条数

    public static PageVo getInstance(IPage iPage){
        PageVo pageVo=new PageVo();
        pageVo.setRecords(iPage.getRecords());
        pageVo.setTotal(iPage.getTotal());
        return pageVo;
    }
}
